add revert for applied fixes - #47
Merged
Merged
Conversation
Owner
|
@claude is this fire |
madoiscool
added a commit
that referenced
this pull request
Sep 8, 2026
Follow-up to #47. Revert no longer deletes its own backups when it fails partway. The cleanup ran before the error check, so a revert blocked by a locked file (the usual cause being the game still running) destroyed every .bak and the manifest, leaving the user half-reverted with no way to finish. It now runs only on full success, so a failed revert is simply retryable. This matches what the apply path already does: it writes the manifest even on partial failure so the backups stay recoverable. Back up by full relative path rather than file name. Fix archives routinely ship the same name in several folders (steam_api64.dll, config.ini), and keying by name collapsed them onto one .bak. The existing guard then skipped backing up the second file while still recording it as "modified" pointing at the first one's backup, so a revert either restored one file with another's contents or silently restored nothing once the .bak was consumed. Constrain both the extract and the revert to the game folder. Zip entry names and the revert manifest are both untrusted input, the manifest lives in a user-writable folder, and the revert path deletes what it resolves. Same containment check DepotDownloaderService.TryDeleteCreatedFiles already uses. Translate the 14 new strings into the remaining 28 locales. The PR shipped English and Spanish only, which failed the i18n check with 28 problems. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the ability to revert an applied fix back to the original game files.
How
.bakinside.luatools-fix/in the game folder, and records every modified/added file in a JSON manifest..bakfiles, deletes the files the fix added, and removes the manifest.config/stplug-in(the same scan the Manage page uses) and shows only those games.